<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="价格库存查询报表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-7" style="width: 60%;">
                    <div class="normal-search clearfix">
                        <label class="control-label"><span translate>零件中文名/编号:</span>：</label>
                        <input type="text" class="form-control m-r-sm" ng-model="condition.materialName"
                            translate translate-attr-placeholder="零件编号">

                        <label class="control-label"><span translate>价格方案</span>：</label>
                        <select ng-model="condition.dataFields" class="form-control m-r-sm"  ng-change="search(1)"
                            ng-options="x.modeRate as (x.name|translate) for x in ratePriceList">
                         </select>
                        <span class="btn btn-primary" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>                
                <div class="search-bar wrapper-none col-xs-5" style="width: 40%;">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div translate translate-attr-title="导出" yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件中文名/编号</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="零件中文名/编号" ng-model="condition.materialName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <textarea ng-model="condition.materialsNos" class="form-control" translate translate-attr-placeholder="逗号分隔或者换行分隔" >
                        </textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件分类</span>：</label>
                        <div ng-model="condition" materiel-class-selector class="sm-size lh-12-20"></div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>库存类型</span>：</label>
                        <select name="status" class="form-control" ng-model="condition.status"
                                ng-options="item.id as (item.name|translate) for item in statusList" required yb-focus>
                            <option value="" translate>请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>仓库编码</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="仓库编码" ng-model="condition.warehouseCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>库区</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="库区" ng-model="condition.areaCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>储位</span>：</label>
                        <textarea ng-model="condition.locationCodes" class="form-control" translate translate-attr-placeholder="逗号分隔或者换行分隔(单个模糊/多个精确)" >
                        </textarea>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>保管员</span>：</label>
                        <input type="text" class="form-control" translate translate-attr-placeholder="保管员" ng-model="condition.keeper">
                    </div>            
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th class="border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span>{{item[itemCol.dataField]}}</span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="itemCol.type != 'marketingMaterialsVOS' && itemCol.dataField != 'standardPrice'">{{item[itemCol.dataField]}} </span>
                                    <span ng-if=" itemCol.dataField == 'standardPrice' ">
                                        {{(item.dataFields ? item.dataFields * item.price: '0').toFixed(2) || '0'}}
                                     </span>                                    
                                    <span ng-if="itemCol.type == 'marketingMaterialsVOS' ">
                                        <select ng-model="item.dataFields" class="form-control"
                                            ng-options="x.modeRate as (x.name|translate) for x in ratePriceList">
                                        </select>                                        
                                     </span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>